<template>
	<view class="container">
		<view class="cell">
			<view class="content">
				<image src="/static/images/services/ystk.png" class="icon"></image>
				<view>隐私条款</view>
			</view>
			<image src="/static/images/navigator-1.png" class="navigator"></image>			
		</view>
		<view class="cell">
			<view class="content">
				<image src="/static/images/services/cjwt.png" class="icon"></image>
				<view>常见问题</view>
			</view>
			<image src="/static/images/navigator-1.png" class="navigator"></image>			
		</view>
		<view class="cell">
			<view class="content">
				<image src="/static/images/services/hyxy.png" class="icon"></image>
				<view>反馈中心</view>
			</view>
			<image src="/static/images/navigator-1.png" class="navigator"></image>			
		</view>
		<view class="cell">
			<view class="content">
				<image src="/static/images/services/bzzx.png" class="icon"></image>
				<view>关于</view>
			</view>
			<image src="/static/images/navigator-1.png" class="navigator"></image>			
		</view>
		<view class="cell" v-if="$config.env == 'dev'">
			<view class="content">
				<image src="/static/images/services/bzzx.png" class="icon"></image>
				<view @tap="payTest">支付测试</view>
			</view>
			<image src="/static/images/navigator-1.png" class="navigator"></image>			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			// 支付测试
			payTest(){
				console.log("进入支付测试")
				const payParam = {
					// appId: result.data.appId,
					// timeStamp: result.data.timeStamp,
					// nonceStr: result.data.nonceStr, // 随机字符串
					// package: result.data.packageValue,
					// signType: result.data.signType,
					// paySign: result.data.paySign,
					appId: "",
					timeStamp: "",
					nonceStr: "", // 随机字符串
					package: "",
					signType: "",
					paySign: ""
				};
				uni.requestPayment({
					provider: 'wxpay',
					payParam: payParam,
					success: function(res) {
						console.log("支付成功"+ JSON.stringify(res))
					},
					fail: function(res) {
						console.log('支付过程失败:' + JSON.stringify(res));
					},
					complete: function(res) {
						console.log("支付完成"+ JSON.stringify(res))
						uni.reLaunch({
							url: "../take-foods/take-foods"
						})
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #FFFFFF;
	}
	
	.cell {
		padding: 30rpx;
		display: flex;
		align-items: center;
		position: relative;
		
		.content {
			flex: 1;
			display: flex;
			align-items: center;
			font-size: $font-size-base;
			color: $text-color-base;
			
			.icon {
				width: 70rpx;
				height: 70rpx;
				margin-right: 10rpx;
			}
		}
		
		.navigator {
			width: 50rpx;
			height: 50rpx;
			position: relative;
			margin-right: -10rpx;
			flex-shrink: 0;
		}
		
		&:after {
			content: '';
			position: absolute;
			border-bottom: 2rpx solid #d9d9d9;
			-webkit-transform: scaleY(0.8);
			transform: scaleY(0.8);
			bottom: 0;
			right: 30rpx;
			left: 30rpx;
		}
	}
</style>
